import request from "@/utils/request";

/**
 * 获取信息
 * @param id 项目id
 */
export function getInfo(id) {
    return request({
        url: '/core/st/v1/' + id,
        method: 'get'
    });
}

/**
 * 点击下一步
 * @param data 参数
 * @returns {Promise<AxiosResponse<any>> | *}
 */
export function stConfig(data) {
    return request({
        url: '/core/st/stConfig',
        method: 'post',
        data:data,
    });
}

/**
 * 执行st分析
 * @param id 分析id
 * @param data 分析编码列表
 * @returns {Promise<AxiosResponse<any>> | *}
 */
export function encodeSt(id,data) {
    return request({
        url: '/core/st/encode/'+ id,
        method: 'post',
        data:data,
    });
}

/**
 * 前一步(to Encode)
 * @param id
 * @returns {Promise<AxiosResponse<any>> | *}
 */
export function pre(id){
    return request({
        url:'/core/st/pre/'+id,
        method: 'put',
    })
}

/**
 * 后一步(to )
 * @param id
 * @returns {Promise<AxiosResponse<any>> | *}
 */
export function finish(id){
    return request({
        url:'core/st/finish/'+id,
        method:'put'
    })
}